package ch.cern

class Point {

  double latitude
  double longitude

  String title
  String description
  Date createdOn

  Map map

  static belongsTo = [map: Map]
  static hasMany = [tags: Tag]

  static constraints = {
    title (nullable:false, blank:false)
    description (nullable:true, blank:true)
    latitude min:-180.0d, max:180d
    longitude min:-180.0d, max:180d
  }
  
  String toString()
  {
    title
  }
}
